#include <iostream>

using namespace std;

int gcd(int val1,int val2)
{
	while(val2)
	{
		int tmp=val2;
		val2=val1%val2;
		val1=tmp;
	}
	return val1;
}

int main()
{
	cout<<"enter two number:"<<endl;
	int v1=0,v2=0;
	cin>>v1>>v2;
	cout<<"gcd: "<<gcd(v1,v2)<<endl;
	return 0;
}